package pt.iul.poo.score;

public class Score implements Comparable<Score> {

	private String playerName;
	private int life;

	public Score(String playerName, int life) {
		this.setPlayerName(playerName);
		this.setLife(life);
	}

	@Override
	public int compareTo(Score classificado) {
		return classificado.getLife()-getLife();
	}

	@Override
	public String toString() {
		return getLife() + "       " + getPlayerName();
	}

	public String getPlayerName() {
		return playerName;
	}

	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}

	public int getLife() {
		return life;
	}

	public void setLife(int life) {
		this.life = life;
	}
}
